100
How do I enable the cross link support ( rectangular )

Exsurfacelib_tlb::IElementsPtr var_Elements = Surface1->Elements;
	var_Elements->Add(TVariant("Element <sha ;;0>A"),TNoParam(),TNoParam());
	var_Elements->Add(TVariant("Element <sha ;;0>B"),TVariant(0),TVariant(76));
	Exsurfacelib_tlb::IElementPtr var_Element = var_Elements->Add(TVariant("Element <sha ;;0>C"),TVariant(-76),TVariant(32));
		var_Element->AutoSize = false;
		var_Element->Height = 32;
	Exsurfacelib_tlb::IElementPtr var_Element1 = var_Elements->Add(TVariant("Element <sha ;;0>D"),TVariant(76),TVariant(32));
		var_Element1->AutoSize = false;
		var_Element1->Height = 32;
Exsurfacelib_tlb::ILinksPtr var_Links = Surface1->Links;
	Exsurfacelib_tlb::ILinkPtr var_Link = var_Links->Add(Surface1->Elements->get_Item(TVariant(1)),Surface1->Elements->get_Item(TVariant(2)),TNoParam());
		var_Link->StartPos = Exsurfacelib_tlb::AlignmentEnum::CenterAlignment;
		var_Link->EndPos = Exsurfacelib_tlb::AlignmentEnum::CenterAlignment;
	Exsurfacelib_tlb::ILinkPtr var_Link1 = var_Links->Add(Surface1->Elements->get_Item(TVariant(2)),Surface1->Elements->get_Item(TVariant(1)),TNoParam());
		var_Link1->StartPos = Exsurfacelib_tlb::AlignmentEnum::CenterAlignment;
		var_Link1->EndPos = Exsurfacelib_tlb::AlignmentEnum::CenterAlignment;
	var_Links->Add(Surface1->Elements->get_Item(TVariant(3)),Surface1->Elements->get_Item(TVariant(4)),TNoParam());
	Exsurfacelib_tlb::ILinkPtr var_Link2 = var_Links->Add(Surface1->Elements->get_Item(TVariant(4)),Surface1->Elements->get_Item(TVariant(3)),TNoParam());
		var_Link2->StartPos = Exsurfacelib_tlb::AlignmentEnum::LeftAlignment;
		var_Link2->EndPos = Exsurfacelib_tlb::AlignmentEnum::RightAlignment;
Surface1->ShowLinks = Exsurfacelib_tlb::ShowExtendedLinksEnum::exShowCrossLinksRect | Exsurfacelib_tlb::ShowExtendedLinksEnum::exShowExtendedLinks;

99
How do I show a link frmo bottom to top, or reverse, not from left to right

Exsurfacelib_tlb::IElementsPtr var_Elements = Surface1->Elements;
	var_Elements->Add(TVariant("Element <sha ;;0>A"),TNoParam(),TNoParam());
	var_Elements->Add(TVariant("Element <sha ;;0>B"),TVariant(0),TVariant(64));
Exsurfacelib_tlb::ILinksPtr var_Links = Surface1->Links;
	Exsurfacelib_tlb::ILinkPtr var_Link = var_Links->Add(Surface1->Elements->get_Item(TVariant(1)),Surface1->Elements->get_Item(TVariant(2)),TNoParam());
		var_Link->StartPos = Exsurfacelib_tlb::AlignmentEnum::CenterAlignment;
		var_Link->EndPos = Exsurfacelib_tlb::AlignmentEnum::CenterAlignment;

98
What options to align the elements do I have if I use Arrange method

Surface1->BeginUpdate();
Surface1->ShowGridLines = true;
Exsurfacelib_tlb::IElementsPtr var_Elements = Surface1->Elements;
	TVariant h1 = TVariant(var_Elements->Add(TVariant("Top Alignment"),TNoParam(),TNoParam())->get_ID());
	var_Elements->Add(TVariant("Element"),TNoParam(),TNoParam());
	var_Elements->Add(TVariant("Element"),TNoParam(),TNoParam());
	var_Elements->Add(TVariant("Element"),TNoParam(),TNoParam());
	TVariant h2 = TVariant(var_Elements->Add(TVariant("Center Alignment"),TNoParam(),TVariant(96))->get_ID());
	var_Elements->Add(TVariant("Element"),TNoParam(),TVariant(96));
	var_Elements->Add(TVariant("Element"),TNoParam(),TVariant(96));
	var_Elements->Add(TVariant("Element"),TNoParam(),TVariant(96));
	TVariant h3 = TVariant(var_Elements->Add(TVariant("Bottom Alignment"),TNoParam(),TVariant(178))->get_ID());
	var_Elements->Add(TVariant("Element"),TNoParam(),TVariant(192));
	var_Elements->Add(TVariant("Element"),TNoParam(),TVariant(192));
	var_Elements->Add(TVariant("Element"),TNoParam(),TVariant(192));
Exsurfacelib_tlb::ILinksPtr var_Links = Surface1->Links;
	var_Links->Add(Surface1->Elements->get_Item(TVariant(1)),Surface1->Elements->get_Item(TVariant(2)),TNoParam());
	var_Links->Add(Surface1->Elements->get_Item(TVariant(1)),Surface1->Elements->get_Item(TVariant(3)),TNoParam());
	var_Links->Add(Surface1->Elements->get_Item(TVariant(2)),Surface1->Elements->get_Item(TVariant(4)),TNoParam());
	var_Links->Add(Surface1->Elements->get_Item(TVariant(2)),Surface1->Elements->get_Item(TVariant(3)),TNoParam());
	var_Links->Add(Surface1->Elements->get_Item(TVariant(5)),Surface1->Elements->get_Item(TVariant(6)),TNoParam());
	var_Links->Add(Surface1->Elements->get_Item(TVariant(5)),Surface1->Elements->get_Item(TVariant(7)),TNoParam());
	var_Links->Add(Surface1->Elements->get_Item(TVariant(6)),Surface1->Elements->get_Item(TVariant(8)),TNoParam());
	var_Links->Add(Surface1->Elements->get_Item(TVariant(6)),Surface1->Elements->get_Item(TVariant(7)),TNoParam());
	var_Links->Add(Surface1->Elements->get_Item(TVariant(9)),Surface1->Elements->get_Item(TVariant(10)),TNoParam());
	var_Links->Add(Surface1->Elements->get_Item(TVariant(9)),Surface1->Elements->get_Item(TVariant(11)),TNoParam());
	var_Links->Add(Surface1->Elements->get_Item(TVariant(10)),Surface1->Elements->get_Item(TVariant(12)),TNoParam());
	var_Links->Add(Surface1->Elements->get_Item(TVariant(10)),Surface1->Elements->get_Item(TVariant(11)),TNoParam());
Surface1->DefArrange[Exsurfacelib_tlb::DefArrangeEnum::exDefArrangeAlign] = TVariant(0);
Surface1->Arrange(TVariant(h1));
Surface1->DefArrange[Exsurfacelib_tlb::DefArrangeEnum::exDefArrangeAlign] = TVariant(1);
Surface1->Arrange(TVariant(h2));
Surface1->DefArrange[Exsurfacelib_tlb::DefArrangeEnum::exDefArrangeAlign] = TVariant(2);
Surface1->Arrange(TVariant(h3));
Surface1->EndUpdate();

97
Is there an auto-arrange feature that will display the flow-chart centered and zoomed correctly after we are finished building it

Exsurfacelib_tlb::IElementsPtr var_Elements = Surface1->Elements;
	var_Elements->Add(TVariant("Element A"),TNoParam(),TNoParam())->set_ID(TVariant("A"));
	var_Elements->Add(TVariant("Element B"),TNoParam(),TNoParam())->set_ID(TVariant("B"));
	var_Elements->Add(TVariant("Element C"),TNoParam(),TNoParam())->set_ID(TVariant("C"));
	var_Elements->Add(TVariant("Element D"),TNoParam(),TNoParam())->set_ID(TVariant("D"));
Exsurfacelib_tlb::ILinksPtr var_Links = Surface1->Links;
	var_Links->Add(Surface1->Elements->get_Item(TVariant("A")),Surface1->Elements->get_Item(TVariant("B")),TNoParam());
	var_Links->Add(Surface1->Elements->get_Item(TVariant("A")),Surface1->Elements->get_Item(TVariant("C")),TNoParam());
	var_Links->Add(Surface1->Elements->get_Item(TVariant("B")),Surface1->Elements->get_Item(TVariant("D")),TNoParam());
	var_Links->Add(Surface1->Elements->get_Item(TVariant("B")),Surface1->Elements->get_Item(TVariant("C")),TNoParam());
Surface1->Arrange(TNoParam());

96
Is it possible to change the distance between elements, when calling the Arrange method

Exsurfacelib_tlb::IElementsPtr var_Elements = Surface1->Elements;
	var_Elements->Add(TVariant("Element A"),TNoParam(),TNoParam())->set_ID(TVariant("A"));
	var_Elements->Add(TVariant("Element B"),TNoParam(),TNoParam())->set_ID(TVariant("B"));
	var_Elements->Add(TVariant("Element C"),TNoParam(),TNoParam())->set_ID(TVariant("C"));
	var_Elements->Add(TVariant("Element D"),TNoParam(),TNoParam())->set_ID(TVariant("D"));
Exsurfacelib_tlb::ILinksPtr var_Links = Surface1->Links;
	var_Links->Add(Surface1->Elements->get_Item(TVariant("A")),Surface1->Elements->get_Item(TVariant("B")),TNoParam());
	var_Links->Add(Surface1->Elements->get_Item(TVariant("A")),Surface1->Elements->get_Item(TVariant("C")),TNoParam());
	var_Links->Add(Surface1->Elements->get_Item(TVariant("B")),Surface1->Elements->get_Item(TVariant("D")),TNoParam());
	var_Links->Add(Surface1->Elements->get_Item(TVariant("B")),Surface1->Elements->get_Item(TVariant("C")),TNoParam());
Surface1->DefArrange[Exsurfacelib_tlb::DefArrangeEnum::exDefArrangeDX] = TVariant(0);
Surface1->DefArrange[Exsurfacelib_tlb::DefArrangeEnum::exDefArrangeDY] = TVariant(0);
Surface1->Arrange(TNoParam());

95
How do I organize vertically the elements

Exsurfacelib_tlb::IElementsPtr var_Elements = Surface1->Elements;
	var_Elements->Add(TVariant("Element A"),TNoParam(),TNoParam())->set_ID(TVariant("A"));
	var_Elements->Add(TVariant("Element B"),TNoParam(),TNoParam())->set_ID(TVariant("B"));
	var_Elements->Add(TVariant("Element C"),TNoParam(),TNoParam())->set_ID(TVariant("C"));
	var_Elements->Add(TVariant("Element D"),TNoParam(),TNoParam())->set_ID(TVariant("D"));
Exsurfacelib_tlb::ILinksPtr var_Links = Surface1->Links;
	var_Links->Add(Surface1->Elements->get_Item(TVariant("A")),Surface1->Elements->get_Item(TVariant("B")),TNoParam());
	var_Links->Add(Surface1->Elements->get_Item(TVariant("A")),Surface1->Elements->get_Item(TVariant("C")),TNoParam());
	var_Links->Add(Surface1->Elements->get_Item(TVariant("B")),Surface1->Elements->get_Item(TVariant("D")),TNoParam());
	var_Links->Add(Surface1->Elements->get_Item(TVariant("B")),Surface1->Elements->get_Item(TVariant("C")),TNoParam());
Surface1->ShowLinksType = Exsurfacelib_tlb::ShowLinkTypeEnum::exLinkStraight;
Surface1->DefArrange[Exsurfacelib_tlb::DefArrangeEnum::exDefArrangeDir] = TVariant(1);
Surface1->Arrange(TNoParam());

94
Is there a way to create a link which has the same start and end element

Exsurfacelib_tlb::IElementsPtr var_Elements = Surface1->Elements;
	var_Elements->Add(TVariant("Element"),TNoParam(),TNoParam());
Exsurfacelib_tlb::ILinksPtr var_Links = Surface1->Links;
	var_Links->Add(Surface1->Elements->get_Item(TVariant(1)),Surface1->Elements->get_Item(TVariant(1)),TNoParam());

93
How can I prevent hiding the item when an item with an outgoing link, is collapsed

Exsurfacelib_tlb::IElementsPtr var_Elements = Surface1->Elements;
	var_Elements->Add(TVariant("Item <sha ;;0>1"),TNoParam(),TNoParam())->set_ID(TVariant(1));
	var_Elements->Insert(TVariant("Item <sha ;;0>2"),TVariant(1),TNoParam())->set_ID(TVariant(2));
	Exsurfacelib_tlb::IElementPtr var_Element = var_Elements->Add(TVariant("Item <sha ;;0>3"),TNoParam(),TNoParam());
		var_Element->set_ID(TVariant(3));
		var_Element->X = 96;
		var_Element->Y = 23;
Exsurfacelib_tlb::ILinksPtr var_Links = Surface1->Links;
	var_Links->Add(Surface1->Elements->get_Item(TVariant(2)),Surface1->Elements->get_Item(TVariant(3)),TNoParam());
Surface1->ShowLinksOnCollapse = true;

92
How can I change the toolbar's visual appearance

Surface1->VisualAppearance->Add(1,TVariant("c:\\exontrol\\images\\normal.ebn"));
Surface1->Background[Exsurfacelib_tlb::BackgroundPartEnum::exToolBarAppearance] = 0x1000000;
Surface1->Background[Exsurfacelib_tlb::BackgroundPartEnum::exToolBarBackColor] = RGB(255,255,255);
Surface1->Background[Exsurfacelib_tlb::BackgroundPartEnum::exToolBarForeColor] = RGB(40,40,40);
Surface1->Background[Exsurfacelib_tlb::BackgroundPartEnum::exToolBarButtonDownBackColor] = 0x1606060;
Surface1->Background[Exsurfacelib_tlb::BackgroundPartEnum::exToolBarButtonDownForeColor] = RGB(240,240,240);
Surface1->Background[Exsurfacelib_tlb::BackgroundPartEnum::exToolBarButtonHotBackColor] = 0x1a0a0a0;
Surface1->Background[Exsurfacelib_tlb::BackgroundPartEnum::exToolBarButtonHotForeColor] = RGB(255,255,255);

91
How can I change the toolbar's background color

Surface1->Background[Exsurfacelib_tlb::BackgroundPartEnum::exToolBarBackColor] = RGB(255,255,255);

90
How can I fit or ensure that all elements are in the control's client area
Exsurfacelib_tlb::IElementsPtr var_Elements = Surface1->Elements;
	var_Elements->Add(TVariant("Element A"),TVariant(-500),TVariant(-500))->BackColor = RGB(0,255,0);
	var_Elements->Add(TVariant("Element B"),TVariant(500),TVariant(500))->BackColor = RGB(255,0,0);
	var_Elements->Add(TVariant("Element C"),TVariant(48),TVariant(24));
Surface1->FitToClient();

89
When I use the context menu to insert an image, the size seems to be fixed to 32 pixels. How can I control / change this

// CreateElement event - The user creates at runtime a new element.
void __fastcall TForm1::Surface1CreateElement(TObject *Sender,Exsurfacelib_tlb::IElement   *Element)
{
	// Element.Edit(0,"multiline,wordwrap")
	// Element.AutoSize = True
	OutputDebugString( L"Call Edit(0) method of the Element object" );
}

// RClick event - Occurs once the user right clicks the control.
void __fastcall TForm1::Surface1RClick(TObject *Sender)
{
	// SelElement(0).Edit(0,"multiline,wordwrap")
	Surface1->set_Selection(Surface1->ElementFromPoint[-1,-1]);
	OutputDebugString( L"Call Edit(0) method of the SelElement(0) property" );
}

Surface1->VisualAppearance->Add(1,TVariant("c:\\exontrol\\images\\normal.ebn"));
Surface1->VisualAppearance->Add(3,TVariant("c:\\exontrol\\images\\hot.ebn"));
Surface1->Background[Exsurfacelib_tlb::BackgroundPartEnum::exContextMenuAppearance] = 0x1000000;
Surface1->Background[Exsurfacelib_tlb::BackgroundPartEnum::exContextMenuSelBackColor] = 0x1fcddc0;
Surface1->Background[Exsurfacelib_tlb::BackgroundPartEnum::exElementBorderColor] = 0x3000000;
Surface1->SelectObjectColor = RGB(192,221,252);
Surface1->HTMLPicture[L"pic1"] = TVariant("c:\\exontrol\\images\\zipdisk.gif");
Surface1->HTMLPicture[L"pic2"] = TVariant("c:\\exontrol\\images\\auction.gif");
Surface1->HTMLPicture[L"pic3"] = TVariant("c:\\exontrol\\images\\colorize.gif");
Exsurfacelib_tlb::IElementsPtr var_Elements = Surface1->Elements;
	var_Elements->Add(TVariant("Element A"),TNoParam(),TNoParam())->set_ID(TVariant("A"));
	Exsurfacelib_tlb::IElementPtr var_Element = var_Elements->Add(TVariant("Custom-size pictures:<br><img>pic1:24</img>,<img>pic2:48</img> ,... and so on."),TVariant(96),TVariant(48));
		var_Element->set_ID(TVariant("B"));
		var_Element->CaptionSingleLine = Exsurfacelib_tlb::CaptionSingleLineEnum::exCaptionWordWrap;
	var_Elements->Add(TVariant("Element C"),TVariant(48),TVariant(24));
Surface1->EditContextMenuItems = TVariant(String("Size[id=57680][edittype=515][border=0][min=16][max=128][freq=16][editwidth=-128][ticklabel=value = %i ? '<b>'+value : ( value =") +
" vmax ? '<fgcolor 808080><font ;6><b>'+value : ( value = vmin ? '<fgcolor 808080><font ;6><b>'+value : '' ) )],Insert[group=3](<" +
"img>pic1:32</img>[id=57763],<img>pic2:32</img>[id=57763],Others[id=1000](default[group=3](<img>pic3</img>[id=57763]),<font ;6>ot" +
"her sizes[sep],<img>pic3:16</img>[id=57763],<img>pic3:32</img>[id=57763],<img>pic3:64</img>[id=57763]))");

88
Can I add images to node while editing the node using the Edit method

// CreateElement event - The user creates at runtime a new element.
void __fastcall TForm1::Surface1CreateElement(TObject *Sender,Exsurfacelib_tlb::IElement   *Element)
{
	// Element.Edit(0,"multiline,wordwrap")
	// Element.AutoSize = True
	OutputDebugString( L"Call Edit(0) method of the Element object" );
}

// RClick event - Occurs once the user right clicks the control.
void __fastcall TForm1::Surface1RClick(TObject *Sender)
{
	// SelElement(0).Edit(0,"multiline,wordwrap")
	Surface1->set_Selection(Surface1->ElementFromPoint[-1,-1]);
	OutputDebugString( L"Call Edit(0) method of the SelElement(0) property" );
}

Surface1->VisualAppearance->Add(1,TVariant("c:\\exontrol\\images\\normal.ebn"));
Surface1->Background[Exsurfacelib_tlb::BackgroundPartEnum::exContextMenuAppearance] = 0x1000000;
Surface1->Background[Exsurfacelib_tlb::BackgroundPartEnum::exContextMenuSelBackColor] = 0x10000ff;
Surface1->SelectObjectStyle = Exsurfacelib_tlb::LinesStyleEnum::exNoLines;
Surface1->SelectObjectColor = RGB(192,221,252);
Surface1->HTMLPicture[L"pic1"] = TVariant("c:\\exontrol\\images\\zipdisk.gif");
Surface1->HTMLPicture[L"pic2"] = TVariant("c:\\exontrol\\images\\auction.gif");
Surface1->Images(TVariant(String("gBJJgBAIDAAGAAEAAQhYAf8Pf4hh0QihCJo2AEZjQAjEZFEaIEaEEaAIAkcbk0olUrlktl0vmExmUzmk1m03nE5nU7nk9n0/oFBoVDolFo1HpFJpVLplNp1PqFRqVTq") +
"lVq1XrFZrVbrldr1fsFhsVjslls1ntFptVrtltt1vuFxuVzul1u13vF5vV7vl9v1/wGBwWDwmFw2HxGJxWLxmNx0xiFdyOTh8Tf9ZymXx+QytcyNgz8r0OblWjyWds+m" +
"0ka1Vf1ta1+r1mos2xrG2xeZ0+a0W0qOx3GO4NV3WeyvD2XJ5XL5nN51aiw+lfSj0gkUkAEllHanHI5j/cHg8EZf7w8vl8j4f/qfEZeB09/vjLAB30+kZQAP/P5/H6/y" +
"NAOAEAwCjMBwFAEDwJBMDwLBYAP2/8Hv8/gAGAD8LQs9w/nhDY/oygIA="));
Exsurfacelib_tlb::IElementsPtr var_Elements = Surface1->Elements;
	var_Elements->Add(TVariant("Element A"),TNoParam(),TNoParam())->set_ID(TVariant("A"));
	Exsurfacelib_tlb::IElementPtr var_Element = var_Elements->Add(TVariant("This is a node that displays pictures:<br><img>pic1:48</img>,<img>pic2:48</img> ,... and so on."),TVariant(96),TVariant(48));
		var_Element->set_ID(TVariant("B"));
		var_Element->CaptionSingleLine = Exsurfacelib_tlb::CaptionSingleLineEnum::exCaptionWordWrap;
	var_Elements->Add(TVariant("Element C"),TVariant(48),TVariant(24))->BackColor = RGB(255,255,255);

87
I am using the Edit method to edit the node, but still not able to display multiple lines. Is this possible

// CreateElement event - The user creates at runtime a new element.
void __fastcall TForm1::Surface1CreateElement(TObject *Sender,Exsurfacelib_tlb::IElement   *Element)
{
	// Element.Edit(0,"multiline,wordwrap")
	// Element.AutoSize = True
	OutputDebugString( L"Call Edit(0) method of the Element object" );
}

// RClick event - Occurs once the user right clicks the control.
void __fastcall TForm1::Surface1RClick(TObject *Sender)
{
	// SelElement(0).Edit(0,"multiline,wordwrap")
	Surface1->set_Selection(Surface1->ElementFromPoint[-1,-1]);
	OutputDebugString( L"Call Edit(0) method of the SelElement(0) property" );
}

Surface1->VisualAppearance->Add(1,TVariant("c:\\exontrol\\images\\normal.ebn"));
Surface1->Background[Exsurfacelib_tlb::BackgroundPartEnum::exContextMenuAppearance] = 0x1000000;
Surface1->Background[Exsurfacelib_tlb::BackgroundPartEnum::exContextMenuSelBackColor] = 0x10000ff;
Surface1->SelectObjectStyle = Exsurfacelib_tlb::LinesStyleEnum::exNoLines;
Surface1->SelectObjectColor = RGB(192,221,252);
Exsurfacelib_tlb::IElementsPtr var_Elements = Surface1->Elements;
	var_Elements->Add(TVariant("Element A"),TNoParam(),TNoParam())->set_ID(TVariant("A"));
	Exsurfacelib_tlb::IElementPtr var_Element = var_Elements->Add(TVariant("Right-<b>Click</b> the node to edit it."),TVariant(96),TVariant(48));
		var_Element->set_ID(TVariant("B"));
		var_Element->CaptionSingleLine = Exsurfacelib_tlb::CaptionSingleLineEnum::exCaptionWordWrap;
	var_Elements->Add(TVariant("Element C"),TVariant(48),TVariant(24))->BackColor = RGB(255,255,255);

86
How can I change the visual appearance of the edit's context menu

// CreateElement event - The user creates at runtime a new element.
void __fastcall TForm1::Surface1CreateElement(TObject *Sender,Exsurfacelib_tlb::IElement   *Element)
{
	// Element.Edit(0)
	// Element.AutoSize = True
	OutputDebugString( L"Call Edit(0) method of the Element object" );
}

// RClick event - Occurs once the user right clicks the control.
void __fastcall TForm1::Surface1RClick(TObject *Sender)
{
	// SelElement(0).Edit(0)
	Surface1->set_Selection(Surface1->ElementFromPoint[-1,-1]);
	OutputDebugString( L"Call Edit(0) method of the SelElement(0) property" );
}

Surface1->VisualAppearance->Add(1,TVariant("c:\\exontrol\\images\\normal.ebn"));
Surface1->Background[Exsurfacelib_tlb::BackgroundPartEnum::exContextMenuAppearance] = 0x1000000;
Surface1->Background[Exsurfacelib_tlb::BackgroundPartEnum::exContextMenuSelBackColor] = 0x10000ff;
Surface1->SelectObjectStyle = Exsurfacelib_tlb::LinesStyleEnum::exNoLines;
Surface1->SelectObjectColor = RGB(192,221,252);
Exsurfacelib_tlb::IElementsPtr var_Elements = Surface1->Elements;
	var_Elements->Add(TVariant("Element A"),TNoParam(),TNoParam())->set_ID(TVariant("A"));
	var_Elements->Add(TVariant("Right-Click to edit this node"),TVariant(96),TVariant(48))->set_ID(TVariant("B"));
	var_Elements->Add(TVariant("Element C"),TVariant(48),TVariant(24))->BackColor = RGB(255,255,255);

85
How can I edit the node once the user right-click the element

// CreateElement event - The user creates at runtime a new element.
void __fastcall TForm1::Surface1CreateElement(TObject *Sender,Exsurfacelib_tlb::IElement   *Element)
{
	// Element.Edit(0)
	// Element.AutoSize = True
	OutputDebugString( L"Call Edit(0) method of the Element object" );
}

// RClick event - Occurs once the user right clicks the control.
void __fastcall TForm1::Surface1RClick(TObject *Sender)
{
	// SelElement(0).Edit(0)
	Surface1->set_Selection(Surface1->ElementFromPoint[-1,-1]);
	OutputDebugString( L"Call Edit(0) method of the SelElement(0) property" );
}

Exsurfacelib_tlb::IElementsPtr var_Elements = Surface1->Elements;
	var_Elements->Add(TVariant("Element A"),TNoParam(),TNoParam())->set_ID(TVariant("A"));
	var_Elements->Add(TVariant("Element B"),TVariant(96),TVariant(48))->set_ID(TVariant("B"));
	var_Elements->Add(TVariant("Element C"),TVariant(48),TVariant(24))->BackColor = RGB(255,255,255);

84
I wish to return the name that is displayed in the Element that I have selected

// SelectionChanged event - Notifies your application that the control's selection has been changed.
void __fastcall TForm1::Surface1SelectionChanged(TObject *Sender)
{
	OutputDebugString( L"The number of selected elements is: " );
	OutputDebugString( PChar(Surface1->SelCount) );
	OutputDebugString( Surface1->SelElement[0]->Caption );
}

Surface1->HideSel = false;
Surface1->SelectObjectColorInactive = Surface1->SelectObjectColor;
Surface1->SelectObjectTextColorInactive = Surface1->SelectObjectTextColor;
Exsurfacelib_tlb::IElementsPtr var_Elements = Surface1->Elements;
	var_Elements->Add(TVariant("Element 1"),TNoParam(),TNoParam())->Selected = true;
	Exsurfacelib_tlb::IElementPtr var_Element = var_Elements->Add(TVariant("Element 2"),TNoParam(),TNoParam());
		var_Element->X = 32;
		var_Element->Y = 32;

83
Been playing with the surface control with the embedded ExGrid ActiveX...I can see most events coming through via the Surface control but I can't get the OnOLEStartDrag event to fire

// OleEvent event - Occurs once an inside control fires an event.
void __fastcall TForm1::Surface1OleEvent(TObject *Sender,Exsurfacelib_tlb::IElement   *Element,Exsurfacelib_tlb::IOleEvent   *Ev)
{
	// Ev.Param(1).Value = 2
	// Ev.Param(0).Value.SetData("items to be carried")
	OutputDebugString( L"Ev" );
}

Surface1->BeginUpdate();
Exsurfacelib_tlb::IElementsPtr var_Elements = Surface1->Elements;
	Exsurfacelib_tlb::IElementPtr var_Element = var_Elements->InsertControl(TVariant("Exontrol.Grid"),TNoParam(),TNoParam(),TNoParam());
		var_Element->ElementFormat = L"\"client\"";
		/*
	Select the Component\Import Component...\Import a Type Library,
	to import the following Type Library:

		ExGrid 1.0 Control Library

	TypeLib: ExGrid.dll

	to define the namespace: Exgridlib_tlb
*/
//#include "EXGRIDLIB_TLB.h"
		Exgridlib_tlb::IGridPtr var_Grid = (IDispatch*)var_Element->Object;
			var_Grid->BeginUpdate();
			var_Grid->OLEDropMode = Exgridlib_tlb::exOLEDropModeEnum::exOLEDropManual;
			var_Grid->Columns->Add(L"Default");
			var_Grid->Items->AddItem(TVariant("Click the item so it gets the focus"));
			var_Grid->EndUpdate();
Surface1->MoveCorner(Exsurfacelib_tlb::ContentAlignmentEnum::exMiddleCenter,Exsurfacelib_tlb::ContentAlignmentEnum::exTopLeft);
Surface1->EndUpdate();

82
Is it possible to assign/add a percent to an element

Exsurfacelib_tlb::IElementsPtr var_Elements = Surface1->Elements;
	Exsurfacelib_tlb::IElementPtr var_Element = var_Elements->Add(TVariant("Element A"),TNoParam(),TNoParam());
		var_Element->set_ID(TVariant("A"));
		var_Element->CaptionAlign = Exsurfacelib_tlb::ContentAlignmentEnum::exTopCenter;
		var_Element->AutoSize = false;
		var_Element->Height = 36;
		var_Element->Width = 96;
		var_Element->MinHeight = 36;
		var_Element->BackgroundExt = L"none[(2,100%-15,100%-4,14)](left[50%,back=RGB(0,255,0),text=`15%`,align=0x11,pattern=6,frame])";
		var_Element->set_BackgroundExtValue(Exsurfacelib_tlb::IndexExtEnum::exIndexExt2,Exsurfacelib_tlb::BackgroundExtPropertyEnum::exClientExt,TVariant("75%"));
		var_Element->set_BackgroundExtValue(Exsurfacelib_tlb::IndexExtEnum::exIndexExt2,Exsurfacelib_tlb::BackgroundExtPropertyEnum::exTextExt,TVariant(var_Element->get_BackgroundExtValue(Exsurfacelib_tlb::IndexExtEnum::exIndexExt2,Exsurfacelib_tlb::BackgroundExtPropertyEnum::exClientExt)));

81
How can I disable selecting the nodes/elements
Surface1->AllowSelectObject = Exsurfacelib_tlb::AllowKeysEnum::exDisallow;
Surface1->AllowSelectNothing = false;
Surface1->AllowSelectObjectRect = Exsurfacelib_tlb::AllowKeysEnum::exDisallow;
Surface1->AllowToggleSelectKey = Exsurfacelib_tlb::AllowKeysEnum::exDisallow;

80
How can I set my zooming levels on the control's toolbar

Surface1->ZoomLevels = L"75,100,150,200";
Surface1->AllowLinkObjects = Exsurfacelib_tlb::AllowKeysEnum::exDisallow;
Exsurfacelib_tlb::IElementsPtr var_Elements = Surface1->Elements;
	var_Elements->Add(TVariant("Element A"),TNoParam(),TNoParam())->set_ID(TVariant("A"));
	var_Elements->Add(TVariant("Element B"),TVariant(96),TVariant(24))->set_ID(TVariant("B"));
	var_Elements->Add(TVariant("Element C"),TVariant(48),TVariant(12))->BackColor = RGB(255,255,255);

79
How can I prevent zooming the surface

Surface1->AllowZoomSurface = Exsurfacelib_tlb::AllowKeysEnum::exDisallow;
Surface1->AllowZoomWheelSurface = false;
Surface1->ToolBarFormat = L"-1,100";

78
How can I prevent adding the links
Surface1->AllowLinkObjects = Exsurfacelib_tlb::AllowKeysEnum::exDisallow;
Exsurfacelib_tlb::IElementsPtr var_Elements = Surface1->Elements;
	var_Elements->Add(TVariant("Element A"),TNoParam(),TNoParam())->set_ID(TVariant("A"));
	var_Elements->Add(TVariant("Element B"),TVariant(96),TVariant(24))->set_ID(TVariant("B"));
	var_Elements->Add(TVariant("Element C"),TVariant(48),TVariant(12))->BackColor = RGB(255,255,255);

77
How can I fix all elements on the surface, so no moving or resizing is allowed

Surface1->AllowResizeObject = Exsurfacelib_tlb::AllowKeysEnum::exDisallow;
Surface1->AllowMoveObject = Exsurfacelib_tlb::AllowKeysEnum::exDisallow;
Exsurfacelib_tlb::IElementsPtr var_Elements = Surface1->Elements;
	var_Elements->Add(TVariant("Element A"),TNoParam(),TNoParam())->set_ID(TVariant("A"));
	var_Elements->Add(TVariant("Element B"),TVariant(96),TVariant(24))->set_ID(TVariant("B"));
	var_Elements->Add(TVariant("Element C"),TVariant(48),TVariant(12))->BackColor = RGB(255,255,255);

76
How can I link elements with no pressing the SHIFT key
Surface1->AllowInsertObject = false;
Surface1->AllowLinkObjects = Exsurfacelib_tlb::AllowKeysEnum::exLeftClick;
Surface1->AllowMoveObject = Exsurfacelib_tlb::AllowKeysEnum::exDisallow;
Exsurfacelib_tlb::IElementsPtr var_Elements = Surface1->Elements;
	var_Elements->Add(TVariant("Element A"),TNoParam(),TNoParam())->set_ID(TVariant("A"));
	var_Elements->Add(TVariant("Element B"),TVariant(96),TVariant(24))->set_ID(TVariant("B"));
	var_Elements->Add(TVariant("Element C"),TVariant(48),TVariant(12))->BackColor = RGB(255,255,255);

75
How can I disable creating the tree/hierarchies
Surface1->AllowInsertObject = false;
Exsurfacelib_tlb::IElementsPtr var_Elements = Surface1->Elements;
	var_Elements->Add(TVariant("Element A"),TNoParam(),TNoParam())->set_ID(TVariant("A"));
	var_Elements->Add(TVariant("Element B"),TVariant(96),TVariant(24))->set_ID(TVariant("B"));
	var_Elements->Add(TVariant("Element C"),TVariant(48),TVariant(12))->BackColor = RGB(255,255,255);

74
How can I create new elements using simple clicks rather than double clicks

Surface1->AllowCreateObject = Exsurfacelib_tlb::AllowKeysEnum::exLeftClick;

73
How can I disable creating new elements at runtime
Surface1->AllowCreateObject = Exsurfacelib_tlb::AllowKeysEnum::exDisallow;

72
I've noticed that the links cut the elements. Is it possible to show the links on the back

Surface1->ShowLinksType = Exsurfacelib_tlb::ShowLinkTypeEnum::exLinkStraight;
Surface1->ShowLinks = Exsurfacelib_tlb::ShowExtendedLinksEnum::exShowExtendedLinks;
Exsurfacelib_tlb::IElementsPtr var_Elements = Surface1->Elements;
	var_Elements->Add(TVariant("Element A"),TNoParam(),TNoParam())->set_ID(TVariant("A"));
	var_Elements->Add(TVariant("Element B"),TVariant(96),TVariant(24))->set_ID(TVariant("B"));
	var_Elements->Add(TVariant("Element C"),TVariant(48),TVariant(12))->BackColor = RGB(255,255,255);
Exsurfacelib_tlb::ILinksPtr var_Links = Surface1->Links;
	var_Links->Add(Surface1->Elements->get_Item(TVariant("A")),Surface1->Elements->get_Item(TVariant("B")),TNoParam())->Caption = L"link";

71
How can I show a picture on the link

Surface1->HTMLPicture[L"pic1"] = TVariant("c:\\exontrol\\images\\zipdisk.gif");
Exsurfacelib_tlb::IElementsPtr var_Elements = Surface1->Elements;
	var_Elements->Add(TVariant("Element A"),TNoParam(),TNoParam())->set_ID(TVariant("A"));
	var_Elements->Add(TVariant("Element B"),TVariant(96),TVariant(24))->set_ID(TVariant("B"));
Exsurfacelib_tlb::ILinksPtr var_Links = Surface1->Links;
	var_Links->Add(Surface1->Elements->get_Item(TVariant("A")),Surface1->Elements->get_Item(TVariant("B")),TNoParam())->Caption = L"<img>pic1:24</img>";
Surface1->ShowLinksType = Exsurfacelib_tlb::ShowLinkTypeEnum::exLinkStraight;

70
How can I show a caption on the link

Exsurfacelib_tlb::IElementsPtr var_Elements = Surface1->Elements;
	var_Elements->Add(TVariant("Element A"),TNoParam(),TNoParam())->set_ID(TVariant("A"));
	var_Elements->Add(TVariant("Element B"),TVariant(96),TVariant(24))->set_ID(TVariant("B"));
Exsurfacelib_tlb::ILinksPtr var_Links = Surface1->Links;
	var_Links->Add(Surface1->Elements->get_Item(TVariant("A")),Surface1->Elements->get_Item(TVariant("B")),TNoParam())->Caption = L"link";
Surface1->ShowLinksType = Exsurfacelib_tlb::ShowLinkTypeEnum::exLinkStraight;

69
I am using EBN to show my arrows, the question is if I can make it bigger/larger

Exsurfacelib_tlb::IAppearancePtr var_Appearance = Surface1->VisualAppearance;
	var_Appearance->Add(1,TVariant("c:\\exontrol\\images\\normal.ebn"));
	var_Appearance->Add(2,TVariant("CP:1 -2 -2 2 2"));
Exsurfacelib_tlb::IElementsPtr var_Elements = Surface1->Elements;
	var_Elements->Add(TVariant("Element A"),TNoParam(),TNoParam())->set_ID(TVariant("A"));
	var_Elements->Add(TVariant("Element B"),TVariant(96),TVariant(24))->set_ID(TVariant("B"));
	var_Elements->Add(TVariant("Element C"),TVariant(96),TVariant(-24))->set_ID(TVariant("C"));
Exsurfacelib_tlb::ILinksPtr var_Links = Surface1->Links;
	var_Links->Add(Surface1->Elements->get_Item(TVariant("A")),Surface1->Elements->get_Item(TVariant("B")),TNoParam());
	var_Links->Add(Surface1->Elements->get_Item(TVariant("A")),Surface1->Elements->get_Item(TVariant("C")),TNoParam());
Surface1->LinksArrowColor = 0x2000000;

68
Is it possible to show different type of arrows for links

Surface1->VisualAppearance->Add(1,TVariant("c:\\exontrol\\images\\normal.ebn"));
Exsurfacelib_tlb::IElementsPtr var_Elements = Surface1->Elements;
	var_Elements->Add(TVariant("Element A"),TNoParam(),TNoParam())->set_ID(TVariant("A"));
	var_Elements->Add(TVariant("Element B"),TVariant(96),TVariant(24))->set_ID(TVariant("B"));
	var_Elements->Add(TVariant("Element C"),TVariant(96),TVariant(-24))->set_ID(TVariant("C"));
Exsurfacelib_tlb::ILinksPtr var_Links = Surface1->Links;
	var_Links->Add(Surface1->Elements->get_Item(TVariant("A")),Surface1->Elements->get_Item(TVariant("B")),TNoParam())->ArrowColor = RGB(255,0,0);
	var_Links->Add(Surface1->Elements->get_Item(TVariant("A")),Surface1->Elements->get_Item(TVariant("C")),TNoParam())->ArrowColor = 0x1000000;

67
How can I remove or clear the entire surface
Surface1->Elements->Add(TVariant("element"),TNoParam(),TNoParam());
Surface1->Elements->Clear();
Surface1->Home();

66
How can I programmatically add a child element, or create a tree/hierarchy

Exsurfacelib_tlb::IElementsPtr var_Elements = Surface1->Elements;
	var_Elements->Add(TVariant("Root"),TNoParam(),TNoParam())->set_ID(TVariant("rootID"));
	var_Elements->Insert(TVariant("Child 1"),TVariant("rootID"),TNoParam());
	var_Elements->Insert(TVariant("Child 2"),TVariant("rootID"),TNoParam())->set_ID(TVariant("childID"));
	var_Elements->Insert(TVariant("Child 3"),TVariant("rootID"),TNoParam());
	var_Elements->Insert(TVariant("Sub-Child 1.2"),TVariant("childID"),TNoParam());
	var_Elements->Insert(TVariant("Sub-Child 2.2"),TVariant("childID"),TNoParam());

65
I've noticed that the element's background is transparent. Can I make it opaque

Exsurfacelib_tlb::IElementsPtr var_Elements = Surface1->Elements;
	var_Elements->Add(TVariant("new 1"),TNoParam(),TNoParam())->BackColor = RGB(255,255,255);
	var_Elements->Add(TVariant("new 1"),TVariant(24),TVariant(24))->BackColor = RGB(240,240,240);

64
How can I add a resizable element
Exsurfacelib_tlb::IElementsPtr var_Elements = Surface1->Elements;
	Exsurfacelib_tlb::IElementPtr var_Element = var_Elements->Add(TVariant("new 1"),TNoParam(),TNoParam());
		var_Element->AutoSize = false;
		var_Element->Resizable = true;
	Exsurfacelib_tlb::IElementPtr var_Element1 = var_Elements->Add(TVariant("new 1"),TVariant(24),TVariant(24));
		var_Element1->AutoSize = false;
		var_Element1->Resizable = true;

63
How can I programmatically add a new element

Exsurfacelib_tlb::IElementsPtr var_Elements = Surface1->Elements;
	var_Elements->Add(TVariant("new 1"),TNoParam(),TNoParam());
	var_Elements->Add(TVariant("new 1"),TVariant(24),TVariant(24));

62
Is it possible to assign a tooltip to an element

Surface1->Elements->Add(TVariant("Element with a Tooltip"),TNoParam(),TNoParam())->ToolTip = L"This is a bit of text that should be displayed when cursor hovers the element.";

61
How do I specify direct/straight link for all links

Surface1->ShowLinksType = Exsurfacelib_tlb::ShowLinkTypeEnum::exLinkStraight | Exsurfacelib_tlb::ShowLinkTypeEnum::exLinkDirect;
Exsurfacelib_tlb::IElementsPtr var_Elements = Surface1->Elements;
	var_Elements->Add(TVariant("Element <sha ;;0>A"),TNoParam(),TNoParam());
	var_Elements->Add(TVariant("Element <sha ;;0>B"),TVariant(96),TVariant(24));
Exsurfacelib_tlb::ILinksPtr var_Links = Surface1->Links;
	var_Links->Add(Surface1->Elements->get_Item(TVariant(1)),Surface1->Elements->get_Item(TVariant(2)),TNoParam());

60
How do I show a direct/straight link

Exsurfacelib_tlb::IElementsPtr var_Elements = Surface1->Elements;
	var_Elements->Add(TVariant("Element <sha ;;0>A"),TNoParam(),TNoParam());
	var_Elements->Add(TVariant("Element <sha ;;0>B"),TVariant(96),TVariant(24));
Exsurfacelib_tlb::ILinksPtr var_Links = Surface1->Links;
	var_Links->Add(Surface1->Elements->get_Item(TVariant(1)),Surface1->Elements->get_Item(TVariant(2)),TNoParam())->ShowLinkType = Exsurfacelib_tlb::ShowLinkTypeEnum::exLinkStraight | Exsurfacelib_tlb::ShowLinkTypeEnum::exLinkDirect;

59
How can I ensure that a specified element fits the surface's visible area

Exsurfacelib_tlb::IElementsPtr var_Elements = Surface1->Elements;
	Exsurfacelib_tlb::IPatternPtr var_Pattern = var_Elements->Add(TVariant("Element A"),TVariant(-100),TNoParam())->Pattern;
		var_Pattern->Type = Exsurfacelib_tlb::PatternEnum::exPatternBDiagonal;
		var_Pattern->Color = RGB(224,224,224);
	var_Elements->Add(TVariant("Element B"),TVariant(2000),TNoParam())->ScrollTo(Exsurfacelib_tlb::ContentAlignmentEnum::exMiddleCenter);

58
Is it possible to show a pattern like ( not available ) over an element

Exsurfacelib_tlb::IElementsPtr var_Elements = Surface1->Elements;
	Exsurfacelib_tlb::IPatternPtr var_Pattern = var_Elements->Add(TVariant("Element+Pattern"),TVariant(-100),TNoParam())->Pattern;
		var_Pattern->Type = Exsurfacelib_tlb::PatternEnum::exPatternBDiagonal;
		var_Pattern->Color = RGB(224,224,224);
	var_Elements->Add(TVariant("Element"),TVariant(100),TNoParam());

57
How can I specify a different overview color for the element

Exsurfacelib_tlb::IElementsPtr var_Elements = Surface1->Elements;
	var_Elements->Add(TVariant("Element+A"),TVariant(-100),TNoParam())->OverviewColor = RGB(255,0,0);
	var_Elements->Add(TVariant("Element+B"),TVariant(100),TNoParam());
Surface1->ScrollPos[true] = 512;

56
I've noticed that some lines are shown on the border, how can I get ride of them

Exsurfacelib_tlb::IElementsPtr var_Elements = Surface1->Elements;
	var_Elements->Add(TVariant("Element+A"),TVariant(-100),TNoParam());
	var_Elements->Add(TVariant("Element+B"),TVariant(100),TNoParam());
Surface1->ScrollPos[true] = 512;
Surface1->OverviewColor = -1;

55
How can I handle clicking an icon or a picture

// HandCursorClick event - The uses clicks a part of the element that shows the had cursor.
void __fastcall TForm1::Surface1HandCursorClick(TObject *Sender,Exsurfacelib_tlb::IElement   *Element,Exsurfacelib_tlb::ShowHandCursorOnEnum   Hit,Variant   Key)
{
	OutputDebugString( L"Key" );
}

Surface1->Images(TVariant(String("gBJJgBAIDAAGAAEAAQhYAf8Pf4hh0QihCJo2AEZjQAjEZFEaIEaEEaAIAkcbk0olUrlktl0vmExmUzmk1m03nE5nU7nk9n0/oFBoVDolFo1HpFJpVLplNp1PqFRqVTq") +
"lVq1XrFZrVbrldr1fsFhsVjslls1ntFptVrtltt1vuFxuVzul1u13vF5vV7vl9v1/wGBwWDwmFw2HxGJxWLxmNx0xiFdyOTh8Tf9ZymXx+QytcyNgz8r0OblWjyWds+m" +
"0ka1Vf1ta1+r1mos2xrG2xeZ0+a0W0qOx3GO4NV3WeyvD2XJ5XL5nN51aiw+lfSj0gkUkAEllHanHI5j/cHg8EZf7w8vl8j4f/qfEZeB09/vjLAB30+kZQAP/P5/H6/y" +
"NAOAEAwCjMBwFAEDwJBMDwLBYAP2/8Hv8/gAGAD8LQs9w/nhDY/oygIA="));
Surface1->HTMLPicture[L"pic1"] = TVariant("c:\\exontrol\\images\\zipdisk.gif");
Surface1->HTMLPicture[L"pic2"] = TVariant("c:\\exontrol\\images\\auction.gif");
Exsurfacelib_tlb::IElementPtr var_Element = Surface1->Elements->Add(TVariant("Caption"),TNoParam(),TNoParam());
	var_Element->Pictures = L"1,2/pic1/pic2";
	var_Element->PicturesAlign = Exsurfacelib_tlb::ContentAlignmentEnum::exBottomCenter;
	var_Element->ShowHandCursorOn = Exsurfacelib_tlb::ShowHandCursorOnEnum::exShowHandCursorExtraPictures | Exsurfacelib_tlb::ShowHandCursorOnEnum::exShowHandCursorPictures | Exsurfacelib_tlb::ShowHandCursorOnEnum::exShowHandCursorIcon | Exsurfacelib_tlb::ShowHandCursorOnEnum::exShowHandCursorPicture;
	var_Element->CaptionAlign = Exsurfacelib_tlb::ContentAlignmentEnum::exTopCenter;

54
How can I display a picture

Surface1->HTMLPicture[L"pic1"] = TVariant("c:\\exontrol\\images\\zipdisk.gif");
Surface1->HTMLPicture[L"pic2"] = TVariant("c:\\exontrol\\images\\auction.gif");
Surface1->Elements->Add(TVariant("Element"),TNoParam(),TNoParam())->Pictures = L"pic1/pic2";

53
How can I display a picture

Surface1->HTMLPicture[L"pic1"] = TVariant("c:\\exontrol\\images\\zipdisk.gif");
Surface1->HTMLPicture[L"pic2"] = TVariant("c:\\exontrol\\images\\auction.gif");
Surface1->Elements->Add(TVariant("Icon <img>pic1</img> or <img>pic2</img>"),TNoParam(),TNoParam());

52
How can I display an icon

Surface1->Images(TVariant(String("gBJJgBAIDAAGAAEAAQhYAf8Pf4hh0QihCJo2AEZjQAjEZFEaIEaEEaAIAkcbk0olUrlktl0vmExmUzmk1m03nE5nU7nk9n0/oFBoVDolFo1HpFJpVLplNp1PqFRqVTq") +
"lVq1XrFZrVbrldr1fsFhsVjslls1ntFptVrtltt1vuFxuVzul1u13vF5vV7vl9v1/wGBwWDwmFw2HxGJxWLxmNx0xiFdyOTh8Tf9ZymXx+QytcyNgz8r0OblWjyWds+m" +
"0ka1Vf1ta1+r1mos2xrG2xeZ0+a0W0qOx3GO4NV3WeyvD2XJ5XL5nN51aiw+lfSj0gkUkAEllHanHI5j/cHg8EZf7w8vl8j4f/qfEZeB09/vjLAB30+kZQAP/P5/H6/y" +
"NAOAEAwCjMBwFAEDwJBMDwLBYAP2/8Hv8/gAGAD8LQs9w/nhDY/oygIA="));
Surface1->Elements->Add(TVariant("Element"),TNoParam(),TNoParam())->Pictures = L"0/1,2";

51
How can I display an icon

Surface1->Images(TVariant(String("gBJJgBAIDAAGAAEAAQhYAf8Pf4hh0QihCJo2AEZjQAjEZFEaIEaEEaAIAkcbk0olUrlktl0vmExmUzmk1m03nE5nU7nk9n0/oFBoVDolFo1HpFJpVLplNp1PqFRqVTq") +
"lVq1XrFZrVbrldr1fsFhsVjslls1ntFptVrtltt1vuFxuVzul1u13vF5vV7vl9v1/wGBwWDwmFw2HxGJxWLxmNx0xiFdyOTh8Tf9ZymXx+QytcyNgz8r0OblWjyWds+m" +
"0ka1Vf1ta1+r1mos2xrG2xeZ0+a0W0qOx3GO4NV3WeyvD2XJ5XL5nN51aiw+lfSj0gkUkAEllHanHI5j/cHg8EZf7w8vl8j4f/qfEZeB09/vjLAB30+kZQAP/P5/H6/y" +
"NAOAEAwCjMBwFAEDwJBMDwLBYAP2/8Hv8/gAGAD8LQs9w/nhDY/oygIA="));
Surface1->Elements->Add(TVariant("Icon <img>1</img> or <img>2</img>"),TNoParam(),TNoParam());

50
How can I prevent moving all descendent/outgoing elements when focused element is moved, more like a free move
Exsurfacelib_tlb::IElementsPtr var_Elements = Surface1->Elements;
	var_Elements->Add(TVariant("Element <sha ;;0>A"),TNoParam(),TNoParam());
	var_Elements->Add(TVariant("Element <sha ;;0>B"),TVariant(96),TVariant(24));
Exsurfacelib_tlb::ILinksPtr var_Links = Surface1->Links;
	var_Links->Add(Surface1->Elements->get_Item(TVariant(1)),Surface1->Elements->get_Item(TVariant(2)),TNoParam());
Surface1->ShowLinksType = Exsurfacelib_tlb::ShowLinkTypeEnum::exLinkStraight | Exsurfacelib_tlb::ShowLinkTypeEnum::exLinkDirect;
Surface1->AllowMoveDescendents = false;

49
How can I display the +/- expand/collapse glyphs next to linked elements

Exsurfacelib_tlb::IElementsPtr var_Elements = Surface1->Elements;
	var_Elements->Add(TVariant("Element <sha ;;0>A"),TNoParam(),TNoParam());
	var_Elements->Add(TVariant("Element <sha ;;0>B"),TVariant(96),TVariant(24));
Exsurfacelib_tlb::ILinksPtr var_Links = Surface1->Links;
	var_Links->Add(Surface1->Elements->get_Item(TVariant(1)),Surface1->Elements->get_Item(TVariant(2)),TNoParam());
Surface1->Elements->get_Item(TVariant(1))->Expanded = false;
Surface1->ExpandLinkedElements = true;

48
How can I host the Exontrol.Button inside the surface

Exsurfacelib_tlb::IElementsPtr var_Elements = Surface1->Elements;
	Exsurfacelib_tlb::IElementPtr var_Element = var_Elements->Add(TVariant("ActiveX"),TNoParam(),TNoParam());
		var_Element->Type = Exsurfacelib_tlb::ElementHostTypeEnum::exElementHostControl;
		var_Element->ElementFormat = L"\"check\":18,\"client\"";
		var_Element->ShowCheckBox = true;
		var_Element->Control = L"Exontrol.Button";
		(IDispatch*)var_Element->Object->Caption = L"<sha ;;0>button";
		var_Element->Height = 32;
		var_Element->Width = 128;

47
How can I host a Command button

Exsurfacelib_tlb::IElementsPtr var_Elements = Surface1->Elements;
	Exsurfacelib_tlb::IElementPtr var_Element = var_Elements->InsertControl(TVariant("Forms.CommandButton.1"),TNoParam(),TNoParam(),TNoParam());
		var_Element->ElementFormat = L"\"check\":18,\"client\"";
		(IDispatch*)var_Element->Object->Caption = L"command";
		var_Element->ShowCheckBox = true;
		var_Element->Height = 48;
		var_Element->Width = 128;

46
How can I handle the events of the inner ActiveX control

// OleEvent event - Occurs once an inside control fires an event.
void __fastcall TForm1::Surface1OleEvent(TObject *Sender,Exsurfacelib_tlb::IElement   *Element,Exsurfacelib_tlb::IOleEvent   *Ev)
{
	OutputDebugString( L"Ev" );
}

Exsurfacelib_tlb::IElementsPtr var_Elements = Surface1->Elements;
	Exsurfacelib_tlb::IElementPtr var_Element = var_Elements->InsertControl(TVariant("Forms.CommandButton.1"),TNoParam(),TNoParam(),TNoParam());
		var_Element->ElementFormat = L"\"check\":18,\"client\"";
		(IDispatch*)var_Element->Object->Caption = L"command";
		var_Element->ShowCheckBox = true;
		var_Element->Height = 48;
		var_Element->Width = 128;

45
How can I display a checkbox while my node hosts an ActiveX inside

Exsurfacelib_tlb::IElementsPtr var_Elements = Surface1->Elements;
	Exsurfacelib_tlb::IElementPtr var_Element = var_Elements->InsertControl(TVariant("Forms.CommandButton.1"),TNoParam(),TNoParam(),TNoParam());
		var_Element->ElementFormat = L"\"check\":18,\"client\"";
		(IDispatch*)var_Element->Object->Caption = L"command";
		var_Element->ShowCheckBox = true;
		var_Element->Height = 48;
		var_Element->Width = 128;

44
Is it possible to display a caption while the element hosts an ActiveX control

Exsurfacelib_tlb::IElementsPtr var_Elements = Surface1->Elements;
	Exsurfacelib_tlb::IElementPtr var_Element = var_Elements->InsertControl(TVariant("Forms.CommandButton.1"),TNoParam(),TNoParam(),TNoParam());
		var_Element->ElementFormat = L"18;\"caption\"/\"client\"";
		(IDispatch*)var_Element->Object->Caption = L"command";
		var_Element->Caption = L"Forms.CommandButton";
		var_Element->CaptionAlign = Exsurfacelib_tlb::ContentAlignmentEnum::exTopCenter;
		var_Element->Height = 48;
		var_Element->Width = 128;

43
I host an ActiveX control but it does not cover the whole element. What can be done

Exsurfacelib_tlb::IElementsPtr var_Elements = Surface1->Elements;
	Exsurfacelib_tlb::IElementPtr var_Element = var_Elements->InsertControl(TVariant("Forms.CommandButton.1"),TNoParam(),TNoParam(),TNoParam());
		var_Element->ElementFormat = L"\"client\"";
		(IDispatch*)var_Element->Object->Caption = L"command";
		var_Element->Height = 32;
		var_Element->Width = 128;
	Exsurfacelib_tlb::IElementPtr var_Element1 = var_Elements->InsertControl(TVariant("Forms.CommandButton.1"),TNoParam(),TNoParam(),TNoParam());
		var_Element1->ElementFormat = L"\"client\"";
		(IDispatch*)var_Element1->Object->Caption = L"command";
		var_Element1->Height = 32;
		var_Element1->Width = 128;

42
How can I host my ActiveX to the surface (method 2)

Exsurfacelib_tlb::IElementsPtr var_Elements = Surface1->Elements;
	Exsurfacelib_tlb::IElementPtr var_Element = var_Elements->InsertControl(TVariant("Forms.CommandButton.1"),TNoParam(),TNoParam(),TNoParam());
		var_Element->ElementFormat = L"\"client\"";
		(IDispatch*)var_Element->Object->Caption = L"command";
		var_Element->Height = 32;
		var_Element->Width = 128;

41
How can I host my ActiveX to the surface (method 1)

Exsurfacelib_tlb::IElementsPtr var_Elements = Surface1->Elements;
	Exsurfacelib_tlb::IElementPtr var_Element = var_Elements->Add(TVariant("ActiveX"),TNoParam(),TNoParam());
		var_Element->Type = Exsurfacelib_tlb::ElementHostTypeEnum::exElementHostControl;
		var_Element->ElementFormat = L"\"client\"";
		var_Element->Control = L"Forms.CommandButton.1";
		(IDispatch*)var_Element->Object->Caption = L"command";
		var_Element->Height = 32;
		var_Element->Width = 128;

40
How can I define the elements with a solid color on the background

Surface1->Background[Exsurfacelib_tlb::BackgroundPartEnum::exElementBorderColor] = -1;
Surface1->Background[Exsurfacelib_tlb::BackgroundPartEnum::exElementStatusColor] = -1;
Surface1->Background[Exsurfacelib_tlb::BackgroundPartEnum::exElementBackColor] = RGB(255,0,0);
Exsurfacelib_tlb::IElementsPtr var_Elements = Surface1->Elements;
	var_Elements->Add(TVariant("Node A"),TNoParam(),TNoParam());
	var_Elements->Add(TVariant("Node B"),TVariant(96),TVariant(24));

39
Can I display the status to a different part of the element

Surface1->Elements->Add(TVariant("Node"),TNoParam(),TNoParam())->StatusAlign = Exsurfacelib_tlb::EdgeAlignmentEnum::exAlignBottom;

38
How can I remove or hide the status part of the event

// AddElement event - A new element has been added to the surface.
void __fastcall TForm1::Surface1AddElement(TObject *Sender,Exsurfacelib_tlb::IElement   *Element)
{
	// Element.StatusSize = 0
}

Surface1->Background[Exsurfacelib_tlb::BackgroundPartEnum::exElementStatusColor] = -1;
Exsurfacelib_tlb::IElementsPtr var_Elements = Surface1->Elements;
	var_Elements->Add(TVariant("Node A"),TNoParam(),TNoParam());
	var_Elements->Add(TVariant("Node B"),TVariant(96),TVariant(24));

37
How can I change the visual appearance of the border for all elements

Surface1->VisualAppearance->Add(1,TVariant("c:\\exontrol\\images\\normal.ebn"));
Surface1->Background[Exsurfacelib_tlb::BackgroundPartEnum::exElementBorderColor] = 0x1000000;
Exsurfacelib_tlb::IElementsPtr var_Elements = Surface1->Elements;
	var_Elements->Add(TVariant("Element+A"),TNoParam(),TNoParam());
	var_Elements->Add(TVariant("Element+B"),TVariant(96),TVariant(24));

36
How can I change the color of the border for all elements

Surface1->Background[Exsurfacelib_tlb::BackgroundPartEnum::exElementBorderColor] = RGB(0,255,0);
Exsurfacelib_tlb::IElementsPtr var_Elements = Surface1->Elements;
	var_Elements->Add(TVariant("Element+A"),TNoParam(),TNoParam());
	var_Elements->Add(TVariant("Element+B"),TVariant(96),TVariant(24));

35
How can I remove the border for all elements

Surface1->Background[Exsurfacelib_tlb::BackgroundPartEnum::exElementBorderColor] = -1;
Exsurfacelib_tlb::IElementsPtr var_Elements = Surface1->Elements;
	var_Elements->Add(TVariant("Element+A"),TNoParam(),TNoParam());
	var_Elements->Add(TVariant("Element+B"),TVariant(96),TVariant(24));

34
How do I change the visual appearance the glpyh that shows when the element is added as a child

Surface1->VisualAppearance->Add(1,TVariant("c:\\exontrol\\images\\normal.ebn"));
Surface1->VisualAppearance->Add(2,TVariant("c:\\exontrol\\images\\pushed.ebn"));
Surface1->Background[Exsurfacelib_tlb::BackgroundPartEnum::exHoverInsertObject] = 0x1000000;
Surface1->Background[Exsurfacelib_tlb::BackgroundPartEnum::exHoverInsertObjectGlyph] = 0x2000000;
Exsurfacelib_tlb::IElementsPtr var_Elements = Surface1->Elements;
	var_Elements->Add(TVariant("Element <sha ;;0>A"),TNoParam(),TNoParam());
	var_Elements->Add(TVariant("Element <sha ;;0>B"),TVariant(96),TVariant(24));

33
Is it possible to change the color for the glpyh that shows when the element is added as a child

Surface1->Background[Exsurfacelib_tlb::BackgroundPartEnum::exHoverInsertObject] = RGB(255,0,0);
Surface1->Background[Exsurfacelib_tlb::BackgroundPartEnum::exHoverInsertObjectGlyph] = RGB(255,0,0);
Exsurfacelib_tlb::IElementsPtr var_Elements = Surface1->Elements;
	var_Elements->Add(TVariant("Element <sha ;;0>A"),TNoParam(),TNoParam());
	var_Elements->Add(TVariant("Element <sha ;;0>B"),TVariant(96),TVariant(24));

32
How can I change the color to show a valid link

Surface1->Background[Exsurfacelib_tlb::BackgroundPartEnum::exLinkObjectsValidColor] = RGB(0,255,0);
Exsurfacelib_tlb::IElementsPtr var_Elements = Surface1->Elements;
	var_Elements->Add(TVariant("Element <sha ;;0>A"),TNoParam(),TNoParam());
	var_Elements->Add(TVariant("Element <sha ;;0>B"),TVariant(96),TVariant(24));

31
How can I change the color to show an invalid link

Surface1->Background[Exsurfacelib_tlb::BackgroundPartEnum::exLinkObjectsInvalidColor] = RGB(0,255,0);
Exsurfacelib_tlb::IElementsPtr var_Elements = Surface1->Elements;
	var_Elements->Add(TVariant("Element <sha ;;0>A"),TNoParam(),TNoParam());
	var_Elements->Add(TVariant("Element <sha ;;0>B"),TVariant(96),TVariant(24));

30
How can I disable adding the elements as child of other nodes
Surface1->AllowInsertObject = false;
Exsurfacelib_tlb::IElementsPtr var_Elements = Surface1->Elements;
	var_Elements->Add(TVariant("Element <sha ;;0>A"),TNoParam(),TNoParam());
	var_Elements->Add(TVariant("Element <sha ;;0>B"),TVariant(96),TVariant(24));

29
How can I prevent moving the outgoing /descendents elements when moving an element
Surface1->ShowLinksType = Exsurfacelib_tlb::ShowLinkTypeEnum::exLinkStraight | Exsurfacelib_tlb::ShowLinkTypeEnum::exLinkDirect;
Surface1->AllowMoveDescendents = false;
Exsurfacelib_tlb::IElementsPtr var_Elements = Surface1->Elements;
	var_Elements->Add(TVariant("Element <sha ;;0>A"),TNoParam(),TNoParam());
	var_Elements->Add(TVariant("Element <sha ;;0>B"),TVariant(96),TVariant(24));
Exsurfacelib_tlb::ILinksPtr var_Links = Surface1->Links;
	var_Links->Add(Surface1->Elements->get_Item(TVariant(1)),Surface1->Elements->get_Item(TVariant(2)),TNoParam());

28
How can I add programatically a link

Exsurfacelib_tlb::IElementsPtr var_Elements = Surface1->Elements;
	var_Elements->Add(TVariant("Element <sha ;;0>A"),TNoParam(),TNoParam());
	var_Elements->Add(TVariant("Element <sha ;;0>B"),TVariant(96),TVariant(24));
Exsurfacelib_tlb::ILinksPtr var_Links = Surface1->Links;
	var_Links->Add(Surface1->Elements->get_Item(TVariant(1)),Surface1->Elements->get_Item(TVariant(2)),TNoParam());

27
How do I prevent adding a link between elements
Surface1->AllowLinkObjects = Exsurfacelib_tlb::AllowKeysEnum::exDisallow;
Exsurfacelib_tlb::IElementsPtr var_Elements = Surface1->Elements;
	var_Elements->Add(TVariant("Element <sha ;;0>A"),TNoParam(),TNoParam());
	var_Elements->Add(TVariant("Element <sha ;;0>B"),TVariant(96),TVariant(24));

26
How can I hide the 100% button ( zoom ) on the control's toolbar

Surface1->ToolBarFormat = L"-1,100";

25
Is it possible to hide the Home button on the control's toolbar

Surface1->ToolBarFormat = L"-1,101";

24
How can I hide the grid lines, including the axis

Surface1->ShowGridLines = false;
Surface1->AxisStyle = Exsurfacelib_tlb::LinesStyleEnum::exNoLines;

23
How can I hide the grid lines

Surface1->ShowGridLines = false;

22
How can I clear the images shown on the control's toolbar

Surface1->ToolBarReplaceIcon(TVariant(0),TVariant(-1));
Surface1->ToolBarRefresh();

21
How can I replace the default icons shown on the control's toolbar

Surface1->ToolBarReplaceIcon(TVariant(0),TVariant(-1));
Surface1->ToolBarImages(TVariant(String("gBJJgBAIDAAGAAEAAQhYAf8Pf4hh0QihCJo2AEZjQAjEZFEaIEaEEaAIAkcbk0olUrlktl0vmExmUzmk1m03nE5nU7nk9n0/oFBoVDolFo1HpFJpVLplNp1PqFRqVTq") +
"lVq1XrFZrVbrldr1fsFhsVjslls1ntFptVrtltt1vuFxuVzul1u13vF5vV7vl9v1/wGBwWDwmFw2HxGJxWLxmNx0xiFdyOTh8Tf9ZymXx+QytcyNgz8r0OblWjyWds+m" +
"0ka1Vf1ta1+r1mos2xrG2xeZ0+a0W0qOx3GO4NV3WeyvD2XJ5XL5nN51aiw+lfSj0gkUkAEllHanHI5j/cHg8EZf7w8vl8j4f/qfEZeB09/vjLAB30+kZQAP/P5/H6/y" +
"NAOAEAwCjMBwFAEDwJBMDwLBYAP2/8Hv8/gAGAD8LQs9w/nhDY/oygIA="));

20
How can I replace the default icons shown on the control's toolbar

Surface1->ToolBarImages(TVariant(String("gBJJgBAIDAAGAAEAAQhYAf8Pf4hh0QihCJo2AEZjQAjEZFEaIEaEEaAIAkcbk0olUrlktl0vmExmUzmk1m03nE5nU7nk9n0/oFBoVDolFo1HpFJpVLplNp1PqFRqVTq") +
"lVq1XrFZrVbrldr1fsFhsVjslls1ntFptVrtltt1vuFxuVzul1u13vF5vV7vl9v1/wGBwWDwmFw2HxGJxWLxmNx0xiFdyOTh8Tf9ZymXx+QytcyNgz8r0OblWjyWds+m" +
"0ka1Vf1ta1+r1mos2xrG2xeZ0+a0W0qOx3GO4NV3WeyvD2XJ5XL5nN51aiw+lfSj0gkUkAEllHanHI5j/cHg8EZf7w8vl8j4f/qfEZeB09/vjLAB30+kZQAP/P5/H6/y" +
"NAOAEAwCjMBwFAEDwJBMDwLBYAP2/8Hv8/gAGAD8LQs9w/nhDY/oygIA="));
Surface1->ToolBarCaption[100] = L"<img>3</img> aka1";

19
How can I add an anchor element to the control's toolbar

// ToolBarAnchorClick event - Occurs when an anchor element is clicked, on the control's toolbar.
void __fastcall TForm1::Surface1ToolBarAnchorClick(TObject *Sender,BSTR   AnchorID,BSTR   Options)
{
	OutputDebugString( L"AnchorID" );
}

Surface1->ToolBarFormat = L"-1,100,101,|,102";
Surface1->ToolBarCaption[102] = L"<a a1>anchor</a>";

18
How can I add a button/image to the control's toolbar

// ToolBarClick event - Occurs when the user clicks a button in the toolbar.
void __fastcall TForm1::Surface1ToolBarClick(TObject *Sender,long   ID,long   SelectedID)
{
	OutputDebugString( L"ID" );
}

Surface1->ToolBarImages(TVariant(String("gBJJgBAIDAAGAAEAAQhYAf8Pf4hh0QihCJo2AEZjQAjEZFEaIEaEEaAIAkcbk0olUrlktl0vmExmUzmk1m03nE5nU7nk9n0/oFBoVDolFo1HpFJpVLplNp1PqFRqVTq") +
"lVq1XrFZrVbrldr1fsFhsVjslls1ntFptVrtltt1vuFxuVzul1u13vF5vV7vl9v1/wGBwWDwmFw2HxGJxWLxmNx0xiFdyOTh8Tf9ZymXx+QytcyNgz8r0OblWjyWds+m" +
"0ka1Vf1ta1+r1mos2xrG2xeZ0+a0W0qOx3GO4NV3WeyvD2XJ5XL5nN51aiw+lfSj0gkUkAEllHanHI5j/cHg8EZf7w8vl8j4f/qfEZeB09/vjLAB30+kZQAP/P5/H6/y" +
"NAOAEAwCjMBwFAEDwJBMDwLBYAP2/8Hv8/gAGAD8LQs9w/nhDY/oygIA="));
Surface1->ToolBarFormat = L"-1,100,101,102";
Surface1->ToolBarCaption[102] = L"<img>3</img> new";

17
How can I add a button to the control's toolbar

// ToolBarClick event - Occurs when the user clicks a button in the toolbar.
void __fastcall TForm1::Surface1ToolBarClick(TObject *Sender,long   ID,long   SelectedID)
{
	OutputDebugString( L"ID" );
}

Surface1->ToolBarFormat = L"-1,100,101,102";
Surface1->ToolBarCaption[102] = L"<sha ;;0>new";

16
How can I hide the control's toolbar

Surface1->ToolBarVisible = false;

15
How can I prevent selecting the elements
Surface1->AllowSelectObject = Exsurfacelib_tlb::AllowKeysEnum::exDisallow;
Surface1->AllowSelectObjectRect = Exsurfacelib_tlb::AllowKeysEnum::exDisallow;
Surface1->AllowToggleSelectKey = Exsurfacelib_tlb::AllowKeysEnum::exDisallow;
Surface1->Elements->Add(TVariant("element"),TNoParam(),TNoParam());

14
How can I show the selected elements the same as the control has the focus

Surface1->HideSel = false;
Surface1->SelectObjectColorInactive = Surface1->SelectObjectColor;
Surface1->SelectObjectTextColorInactive = Surface1->SelectObjectTextColor;
Surface1->Elements->Add(TVariant("element"),TNoParam(),TNoParam())->Selected = true;

13
How can I show the selected elements with a different border

Surface1->VisualAppearance->Add(1,TVariant("c:\\exontrol\\images\\normal.ebn"));
Surface1->HideSel = false;
Surface1->SelectObjectStyle = Exsurfacelib_tlb::LinesStyleEnum::exLinesSolid;
Surface1->SelectObjectColor = 0x1000000;
Surface1->SelectObjectTextColor = RGB(0,0,0);
Surface1->SelectObjectColorInactive = Surface1->SelectObjectColor;
Surface1->SelectObjectTextColorInactive = Surface1->SelectObjectTextColor;
Surface1->Elements->Add(TVariant("element"),TNoParam(),TNoParam())->Selected = true;

12
How can I show the selected elements with a different background color

Surface1->HideSel = false;
Surface1->SelectObjectStyle = Exsurfacelib_tlb::LinesStyleEnum::exNoLines;
Surface1->SelectObjectColor = RGB(255,0,0);
Surface1->SelectObjectTextColor = RGB(255,255,255);
Surface1->SelectObjectColorInactive = Surface1->SelectObjectColor;
Surface1->SelectObjectTextColorInactive = Surface1->SelectObjectTextColor;
Surface1->Elements->Add(TVariant("element"),TNoParam(),TNoParam())->Selected = true;

11
Is it possible to add an inner control on the surface

// OleEvent event - Occurs once an inside control fires an event.
void __fastcall TForm1::Surface1OleEvent(TObject *Sender,Exsurfacelib_tlb::IElement   *Element,Exsurfacelib_tlb::IOleEvent   *Ev)
{
	OutputDebugString( L"Ev" );
}

Exsurfacelib_tlb::IElementsPtr var_Elements = Surface1->Elements;
	Exsurfacelib_tlb::IElementPtr var_Element = var_Elements->Add(TVariant("activex hosting"),TNoParam(),TNoParam());
		var_Element->Type = Exsurfacelib_tlb::ElementHostTypeEnum::exElementHostControl;
		var_Element->Control = L"Forms.CommandButton.1";
		var_Element->Caption = L"Command Button";
		var_Element->Height = 64;
		var_Element->Width = 128;
		var_Element->ElementFormat = L"14;\"caption\"/\"client\"";
		var_Element->CaptionAlign = Exsurfacelib_tlb::ContentAlignmentEnum::exTopCenter;

10
How can I make the control read-only
// LayoutStartChanging event - Occurs when the control's layout is about to be changed.
void __fastcall TForm1::Surface1LayoutStartChanging(TObject *Sender,Exsurfacelib_tlb::LayoutChangingEnum   Operation)
{
	OutputDebugString( L"Operation" );
	Surface1->CancelLayoutChanging();
}

Exsurfacelib_tlb::IElementsPtr var_Elements = Surface1->Elements;
	var_Elements->Add(TVariant("new element"),TNoParam(),TNoParam());

9
How can I handle clicking a picture on the element

// HandCursorClick event - The uses clicks a part of the element that shows the had cursor.
void __fastcall TForm1::Surface1HandCursorClick(TObject *Sender,Exsurfacelib_tlb::IElement   *Element,Exsurfacelib_tlb::ShowHandCursorOnEnum   Hit,Variant   Key)
{
	OutputDebugString( L"Key" );
}

Surface1->Images(TVariant(String("gBJJgBAIDAAGAAEAAQhYAf8Pf4hh0QihCJo2AEZjQAjEZFEaIEaEEaAIAkcbk0olUrlktl0vmExmUzmk1m03nE5nU7nk9n0/oFBoVDolFo1HpFJpVLplNp1PqFRqVTq") +
"lVq1XrFZrVbrldr1fsFhsVjslls1ntFptVrtltt1vuFxuVzul1u13vF5vV7vl9v1/wGBwWDwmFw2HxGJxWLxmNx0xiFdyOTh8Tf9ZymXx+QytcyNgz8r0OblWjyWds+m" +
"0ka1Vf1ta1+r1mos2xrG2xeZ0+a0W0qOx3GO4NV3WeyvD2XJ5XL5nN51aiw+lfSj0gkUkAEllHanHI5j/cHg8EZf7w8vl8j4f/qfEZeB09/vjLAB30+kZQAP/P5/H6/y" +
"NAOAEAwCjMBwFAEDwJBMDwLBYAP2/8Hv8/gAGAD8LQs9w/nhDY/oygIA="));
Exsurfacelib_tlb::IElementsPtr var_Elements = Surface1->Elements;
	Exsurfacelib_tlb::IElementPtr var_Element = var_Elements->Add(TVariant("new element"),TNoParam(),TNoParam());
		var_Element->CaptionAlign = Exsurfacelib_tlb::ContentAlignmentEnum::exTopRight;
		var_Element->PicturesAlign = Exsurfacelib_tlb::ContentAlignmentEnum::exTopLeft;
		var_Element->ShowHandCursorOn = Exsurfacelib_tlb::ShowHandCursorOnEnum::exShowHandCursorAnchorAll | Exsurfacelib_tlb::ShowHandCursorOnEnum::exShowHandCursorPictures | Exsurfacelib_tlb::ShowHandCursorOnEnum::exShowHandCursorIcon | Exsurfacelib_tlb::ShowHandCursorOnEnum::exShowHandCursorPicture;
		var_Element->Pictures = L"0,1,2";

8
How can I show the hand cursor when user hovers the element's image

// HandCursorClick event - The uses clicks a part of the element that shows the had cursor.
void __fastcall TForm1::Surface1HandCursorClick(TObject *Sender,Exsurfacelib_tlb::IElement   *Element,Exsurfacelib_tlb::ShowHandCursorOnEnum   Hit,Variant   Key)
{
	OutputDebugString( L"Key" );
}

Surface1->Images(TVariant(String("gBJJgBAIDAAGAAEAAQhYAf8Pf4hh0QihCJo2AEZjQAjEZFEaIEaEEaAIAkcbk0olUrlktl0vmExmUzmk1m03nE5nU7nk9n0/oFBoVDolFo1HpFJpVLplNp1PqFRqVTq") +
"lVq1XrFZrVbrldr1fsFhsVjslls1ntFptVrtltt1vuFxuVzul1u13vF5vV7vl9v1/wGBwWDwmFw2HxGJxWLxmNx0xiFdyOTh8Tf9ZymXx+QytcyNgz8r0OblWjyWds+m" +
"0ka1Vf1ta1+r1mos2xrG2xeZ0+a0W0qOx3GO4NV3WeyvD2XJ5XL5nN51aiw+lfSj0gkUkAEllHanHI5j/cHg8EZf7w8vl8j4f/qfEZeB09/vjLAB30+kZQAP/P5/H6/y" +
"NAOAEAwCjMBwFAEDwJBMDwLBYAP2/8Hv8/gAGAD8LQs9w/nhDY/oygIA="));
Exsurfacelib_tlb::IElementsPtr var_Elements = Surface1->Elements;
	Exsurfacelib_tlb::IElementPtr var_Element = var_Elements->Add(TVariant("new element"),TNoParam(),TNoParam());
		var_Element->CaptionAlign = Exsurfacelib_tlb::ContentAlignmentEnum::exTopRight;
		var_Element->PicturesAlign = Exsurfacelib_tlb::ContentAlignmentEnum::exTopLeft;
		var_Element->ShowHandCursorOn = Exsurfacelib_tlb::ShowHandCursorOnEnum::exShowHandCursorAnchorAll | Exsurfacelib_tlb::ShowHandCursorOnEnum::exShowHandCursorPictures | Exsurfacelib_tlb::ShowHandCursorOnEnum::exShowHandCursorIcon | Exsurfacelib_tlb::ShowHandCursorOnEnum::exShowHandCursorPicture;
		var_Element->Pictures = L"0,1,2";

7
How can I show the hand cursor when user hovers the element's checkbox

Exsurfacelib_tlb::IElementsPtr var_Elements = Surface1->Elements;
	Exsurfacelib_tlb::IElementPtr var_Element = var_Elements->Add(TVariant("new element"),TNoParam(),TNoParam());
		var_Element->CaptionAlign = Exsurfacelib_tlb::ContentAlignmentEnum::exTopRight;
		var_Element->CheckBoxAlign = Exsurfacelib_tlb::ContentAlignmentEnum::exTopLeft;
		var_Element->ShowCheckBox = true;
		var_Element->ShowHandCursorOn = Exsurfacelib_tlb::ShowHandCursorOnEnum::exShowHandCursorAnchorAll | Exsurfacelib_tlb::ShowHandCursorOnEnum::exShowHandCursorCheck;

6
How can I remove the status part for all elements

// AddElement event - A new element has been added to the surface.
void __fastcall TForm1::Surface1AddElement(TObject *Sender,Exsurfacelib_tlb::IElement   *Element)
{
	// Element.StatusSize = 0
}

Surface1->Background[Exsurfacelib_tlb::BackgroundPartEnum::exElementStatusColor] = -1;
Surface1->Elements->Add(TVariant("new element"),TNoParam(),TNoParam());

5
How can I remove the border for all elements

Surface1->Background[Exsurfacelib_tlb::BackgroundPartEnum::exElementBorderColor] = -1;
Surface1->Elements->Add(TVariant("new element"),TNoParam(),TNoParam());

4
How do I edit the element's caption once the user creates the element

// CreateElement event - The user creates at runtime a new element.
void __fastcall TForm1::Surface1CreateElement(TObject *Sender,Exsurfacelib_tlb::IElement   *Element)
{
	// Element.Edit(0)
	// Element.AutoSize = True
}


3
How can I align the element's checkbox next to the text

Surface1->BeginUpdate();
Exsurfacelib_tlb::IElementsPtr var_Elements = Surface1->Elements;
	Exsurfacelib_tlb::IElementPtr var_Element = var_Elements->Add(TVariant("text"),TNoParam(),TNoParam());
		var_Element->ShowCheckBox = true;
		var_Element->CaptionAlign = Exsurfacelib_tlb::ContentAlignmentEnum::exTopRight;
		var_Element->CheckBoxAlign = Exsurfacelib_tlb::ContentAlignmentEnum::exTopLeft;
Surface1->EndUpdate();

2
How can I assign a check-box to all elements

// AddElement event - A new element has been added to the surface.
void __fastcall TForm1::Surface1AddElement(TObject *Sender,Exsurfacelib_tlb::IElement   *Element)
{
	// Element.ShowCheckBox = True
}

Surface1->BeginUpdate();
Exsurfacelib_tlb::IElementsPtr var_Elements = Surface1->Elements;
	var_Elements->Add(TVariant(""),TVariant(-24),TVariant(-24));
	var_Elements->Add(TVariant(""),TNoParam(),TNoParam())->Checked = Exsurfacelib_tlb::CheckStateEnum::exChecked;
Surface1->Home();
Surface1->EndUpdate();

1
How do I change the control's background color

Surface1->BackColor = RGB(240,240,240);